package com.ruoyi.wms.domain.bo.stock;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
import com.ruoyi.wms.domain.entity.stock.PurchaseRequestDetails;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 采购申请详情业务对象 wms_purchase_request_details
 *
 * @author 邓滔滔
 * @date 2024-11-20
 */

@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PurchaseRequestDetails.class, reverseConvertGenerate = false)
public class PurchaseRequestDetailsBo extends BaseEntity {

    /**
     * 主键ID
     */
    private Long id;

    /**
     * 关联的采购申请单ID
     */
    @NotNull(message = "关联的采购申请单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long requestId;

    /**
     * 商品规格ID
     */
    @NotNull(message = "商品规格ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long skuId;

    /**
     * 申请数量
     */
    @NotNull(message = "申请数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal quantity;

    /**
     * 单价
     */
    @NotNull(message = "单价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * 金额
     */
    private BigDecimal amount;

    /**
     * 备注
     */
    private String remark;


}
